Remove GetFullName(DefType) extension method and replace usage#123001
Merged
MichalStrehovsky merged 3 commits intomainfrom Jan 9, 2026
Merged
Remove GetFullName(DefType) extension method and replace usage#123001MichalStrehovsky merged 3 commits intomainfrom
MichalStrehovsky merged 3 commits intomainfrom
Conversation
Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove GetFullName extension method for DefType
Remove GetFullName(DefType) extension method and replace usage
Jan 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes an unused extension method and consolidates error handling to use a standard helper method. The DefType-specific GetFullName extension method is deleted from TypeSystemHelpers.cs, and its single usage in EcmaType.cs is replaced with a call to ThrowHelper.ThrowTypeLoadException.
- Removed the
GetFullName(this DefType metadataType)extension method from TypeSystemHelpers.cs - Replaced the exception throw in EcmaType.cs with a standardized ThrowHelper call
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/tools/Common/TypeSystem/Ecma/EcmaType.cs | Updated exception throwing to use ThrowHelper.ThrowTypeLoadException(this) instead of manually constructing TypeLoadException with GetFullName() |
| src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs | Removed the DefType-specific GetFullName extension method (lines 160-167 in the new version) |
Member
|
@eduardo-vp could you have a look? This is related to the UTF-8 conversions. |
eduardo-vp
approved these changes
Jan 8, 2026
jkotas
reviewed
Jan 9, 2026
src/coreclr/tools/Common/TypeSystem/Common/TypeSystemHelpers.cs
Outdated
Show resolved
Hide resolved
jkotas
approved these changes
Jan 9, 2026
Member
|
/ba-g deadletter on ios |
This was referenced Jan 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removed the
GetFullName(this DefType metadataType)extension method from TypeSystemHelpers.cs and replaced its single usage in EcmaType.cs withThrowHelper.ThrowTypeLoadException(this).Changes:
throw new TypeSystemException.TypeLoadException(ExceptionStringID.ClassLoadGeneral, GetFullName())withThrowHelper.ThrowTypeLoadException(this)Other GetFullName overloads for TypeDesc, FieldDesc, and MethodDesc remain unchanged.
Customer Impact
None. Internal refactoring only.
Regression
No. This is a code cleanup change.
Testing
Built CoreCLR tools successfully with
./build.sh clr.Risk
Low. Single-line usage replacement with existing helper method. No functional change to error handling behavior.
Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.